<div class="c_body">
	<div class="u_tabs">
		<div class="u_tabs_head">
			<div class="u_tab curr" id="u_search_tab1">Пригласить друзей</div>
			<!-- <div class="u_tab" id="u_search_tab2">Друзья в группе</div> -->
		</div>
		<?php /*<div class="search_block cat_search_block">
			<form action="" id="cat_search">
				<div class="search_fld">
					<div class="search_icon"></div>
					<input type="text" value="Начните вводить имя" id="search_community" />
				</div>
			</form>
		</div>*/?>
	</div>
	<div class="cat_head">
		<div class="cat_head_strip"></div>
			
		<div class="cat_head_h t">
			<p class="cat_head_h_txt">
				У Вас  <span><?php echo count($model); ?></span> друзей
			</p>
			<a class="cat_head_h_edit" href="<?php echo Yii::app()->createUrl('groups/view',array('group'=>Yii::app()->request->getParam('group')));?>">
				назад к <?php echo CHtml::encode($group->name); ?>
			</a>
		</div>
	</div>
	<div class="filter_block">
		<div class="tab" id="u_search_tab1_">
			<?php if(count($model) > 0) : ?>			
				<?php foreach($model as $person){ ?>
					<div class="f_list_item">
						<a href="<?php echo Yii::app()->createUrl('profile/index', array('id'=>$person->friend_info->id));?>" class="f_list_img">
							<?php if($person->friend_info->avatar_info){ ?>
								<?php echo $this->material_image('', $person->friend_info->avatar_info->name, '100', 'photos/'. $person->friend_info->id . '/' . 0); ?>
							<?php }else{ ?>
								<?php echo $this->material_image('', 'noimage.gif', '100', ''); ?>
							<?php } ?>
						</a>
						<div class="f_list_txt no_l">
							<div class="f_list_name">
								<a href="<?php echo Yii::app()->createUrl('profile/index', array('id'=>$person->friend_info->id));?>"><?php echo CHtml::encode($person->friend_info->full_name); ?></a>
							</div>
							<div class="f_list_data">
								<p>
									<?php if($person->friend_info->country_id){ echo CHtml::encode( CSelect::item($person->friend_info->country_id, "Country"));  } ?>
									<?php if($person->friend_info->country_id && $person->friend_info->city){ echo ", "; } ?>
									<?php if($person->friend_info->city){ echo CHtml::encode($person->friend_info->city); } ?>
								</p>
							</div>
							<div class="f_list_action">
								<div>
									<?php if(!$person->friend_info->invite_group OR $person->friend_info->invite_group AND $person->friend_info->invite_group->invitation==0) {?>
										<a class="inviteLink" href="<?php echo Yii::app()->createUrl('groups/addUser', array('id' => $person->friend_info->id, 'group'=>Yii::app()->request->getParam('group')));?>">Пригласить</a>
									<?php }else{ ?>
										<p class="msg">Приглашен</p>
									<?php } ?>
								</div>
							</div>
						</div>
					</div>
				<?php } ?>		
			<?php endif; ?>
		</div>

		<div class="tab hidden" id="u_search_tab2_">
			<?php // Друзья в группе ?>
		</div>
	</div>
	<div class="clear"></div>
</div>